﻿#region Copyrights Notice
//©2010 Microsoft Corporation. All rights reserved.
#endregion

#region usings
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;

using Microsoft.InformationSecurity.CISF.SecurityPortal.Business.Entities;
#endregion

namespace Microsoft.InformationSecurity.CISF.SecurityPortal.Services.Contracts
{
    [ServiceContract(Name = "PortalService",
    Namespace = "http://InfosecTools//SecurityPortal/PortalServices/V1.0/PortalService",
    SessionMode = SessionMode.Allowed)]
    public interface IPortalServiceContract
    {
        /// <summary>
        /// Gets list of all widgets for the selected user.
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<Widget> GetWidgetList(string userName);

        /// <summary>
        /// Returns boolean if a user is registered with Portal or not.
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        Boolean IsRegisteredUser(string userName);

        /// <summary>
        /// Loads widgets for the selected user and returns the WidgetSetup
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        WidgetSetup LoadWidgetSetup(string userName);

        /// <summary>
        /// Gets widgets for the selected user and returns the WidgetSetup
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        WidgetSetup GetWidgetSetup(string userName);

        /// <summary>
        /// Resets and loads widgets for the selected user and returns the WidgetSetup
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        WidgetSetup ResetWidgetSetup(string userName);

        /// <summary>
        /// Updates and loads widgets for the selected user and returns the WidgetSetup
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        WidgetSetup UpdateWidgetSetup(string userName, WidgetSetup _oldSetup, WidgetSetup _newSetup);
   
        /// <summary>
        /// Operation to Minimize the Widget Size
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        Boolean MinimizeWidget(string userName, Int32 WidgetId);

        /// <summary>
        /// Operation to Maximize the Widget Size
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        Boolean MaximizeWidget(string userName, Int32 WidgetId);

        /// <summary>
        /// Operation to make the Widget FULL Screen Size
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        Boolean FullScreenWidget(string userName, Int32 WidgetId);

        /// <summary>
        /// Operation to Delete the Widget
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        Boolean DeleteWidget(string userName, Int32 WidgetId);

        /// <summary>
        /// Operation to Delete the Widget
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        Boolean UpdateWidgetState(string userName, Int32 WidgetId, string State);


    }
}
